/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.magicland;

import java.util.ArrayList;
import java.util.*;
import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import org.jdesktop.layout.GroupLayout.SequentialGroup;

/**
 *
 * @author eduardo
 */
public class GUI extends javax.swing.JFrame {

    /**
     * Creates new form GUI
     */
    public GUI() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        HelloLabel = new javax.swing.JLabel();
        EnergiaLabel = new javax.swing.JLabel();
        OuroLabel = new javax.swing.JLabel();
        FrutaLabel = new javax.swing.JLabel();
        MadeiraLabel = new javax.swing.JLabel();
        MapaPanel = new javax.swing.JPanel();
        MissionsScrollPane = new javax.swing.JScrollPane();
        missionTextArea = new javax.swing.JTextArea();
        HintsTextField = new javax.swing.JTextField();
        buildComboBox = new javax.swing.JComboBox();
        MapaExplore1Panel = new javax.swing.JPanel();
        profileMenu = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("MagicLand");
        setResizable(false);

        HelloLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        HelloLabel.setText("Hello, Fulano");

        EnergiaLabel.setText("Energia: 0");

        OuroLabel.setText("Ouro: 0");

        FrutaLabel.setText("Fruta: 0");

        MadeiraLabel.setText("Madeira 0");

        org.jdesktop.layout.GroupLayout MapaPanelLayout = new org.jdesktop.layout.GroupLayout(MapaPanel);
        MapaPanel.setLayout(MapaPanelLayout);
        MapaPanelLayout.setHorizontalGroup(
            MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 412, Short.MAX_VALUE)
        );
        MapaPanelLayout.setVerticalGroup(
            MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 152, Short.MAX_VALUE)
        );

        missionTextArea.setColumns(20);
        missionTextArea.setRows(4);
        MissionsScrollPane.setViewportView(missionTextArea);

        buildComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        org.jdesktop.layout.GroupLayout MapaExplore1PanelLayout = new org.jdesktop.layout.GroupLayout(MapaExplore1Panel);
        MapaExplore1Panel.setLayout(MapaExplore1PanelLayout);
        MapaExplore1PanelLayout.setHorizontalGroup(
            MapaExplore1PanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 212, Short.MAX_VALUE)
        );
        MapaExplore1PanelLayout.setVerticalGroup(
            MapaExplore1PanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 0, Short.MAX_VALUE)
        );

        profileMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/settings.png"))); // NOI18N
        profileMenu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                profileMenuActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(HintsTextField)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(layout.createSequentialGroup()
                                .add(9, 9, 9)
                                .add(HelloLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 113, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(108, 108, 108)
                                .add(OuroLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(EnergiaLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(FrutaLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(MadeiraLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 84, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(160, 160, 160)
                                .add(profileMenu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(MissionsScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 816, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(0, 32, Short.MAX_VALUE)))
                .addContainerGap())
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(buildComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 212, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(layout.createSequentialGroup()
                        .add(MapaExplore1Panel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(0, 0, 0)
                        .add(MapaPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .add(110, 110, 110))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(15, 15, 15)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(HelloLabel)
                            .add(EnergiaLabel)
                            .add(OuroLabel)
                            .add(FrutaLabel)
                            .add(MadeiraLabel))
                        .add(19, 19, 19))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                        .addContainerGap()
                        .add(profileMenu)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)))
                .add(MissionsScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(30, 30, 30)
                .add(buildComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(MapaPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(MapaExplore1Panel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 50, Short.MAX_VALUE)
                .add(HintsTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(33, 33, 33))
        );

        setSize(new java.awt.Dimension(860, 466));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents
    
    public void localizedAPP(java.awt.event.ActionEvent evt){
   
        javax.swing.JComboBox comboBox =  (javax.swing.JComboBox) evt.getSource();
        
        
        System.out.println(comboBox.getItemAt(0));
        String lang="";
        if( comboBox.getSelectedIndex() ==0 )
            lang="en";
        else if( comboBox.getSelectedIndex() ==1 )
            lang="pt";
            
        String file_lang = "localized_"+lang+".txt";
        //System.out.println(file_lang);
        
        Hashtable<String,String> hashtabeLocalized =null ;
        try {
            hashtabeLocalized = Main.loc.getHashTableLocalized();
        } catch (CloneNotSupportedException ex) {
          ex.printStackTrace();
        }
        
        Main.loc.loadResource("localized_"+lang+".txt");
        
        localizeMap(hashtabeLocalized);
        
        this.update();
    
    
    
    }
    
    public static Profile profileJframe = new Profile();
    private void profileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileMenuActionPerformed
        // TODO add your handling code here:
        profileJframe.setVisible(true);
    }//GEN-LAST:event_profileMenuActionPerformed

     
    
    /**
     * @param args the command line arguments
     */
  /*  public static void GUI() {
        //Set the Nimbus look and feel
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//         If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
//         For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

//         Create and display the form 
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GUI().setVisible(true);
            }
        });
    }*/
    
    
    public void update(){
    
        this.updateHud( GameManager.getInstance().getPlayer().getNome(),
                        GameManager.getInstance().getPlayer().getOuro(),
                        GameManager.getInstance().getPlayer().getEnergia(),
                        GameManager.getInstance().getPlayer().getFruta(),
                        GameManager.getInstance().getPlayer().getMadeira());
        
       //tutorial
        if( !GameManager.getInstance().getPlayer().isTutorialComplete() ){
             runTutorial();
             
            //traduz o campo tutorial 
             Mission mission;
             if(( mission = MissionsManager.getCurrentMission()) != null )
                    updateMissionTextArea( Main.loc.getText( mission.getMissionMensage() ) );
        }
        else
            updateMissionTextArea( Main.loc.getText( "str_all_missions_complete"  ) );
    }
    
    public void setGameComplete(){
        
        JOptionPane.showMessageDialog(this, Main.loc.getText("str_congratulations_kill_dragon"));
        resetGame();
    }
    
    public void resetGame(){
    
        //this.resetMAPs();
        GameManager.getInstance().removeSave(); 
        //userNameTextField.setText( "" );
        resetMAPs();
        update();
    
    }
    
    
    public void updateMissionTextArea(String msg){
        
        missionTextArea.setText( msg );
    }
    
    //public static Mission currentMission;
    public void runTutorial(){
        
       Mission currentMission;
       
       currentMission =  GameManager.getInstance().getMissionManager().getNextMission();
        if(currentMission != null){
            System.out.println(currentMission);   
            updateMissionTextArea(  Main.loc.getText( currentMission.getMissionMensage()));
        }
        else {//todas as missoes foram concluidas
            
            GameManager.getInstance().getPlayer().setTutorialComplete(1);
            updateMissionTextArea( Main.loc.getText( "str_all_missions_complete" ));
            
        }
            
    }
    
   
    public void checkMissionComplete(String ItemName){
        
         
       Mission currentMission =  MissionsManager.getCurrentMission();
               
        //System.out.println("checkMissionComplete::::"+ItemName);
        if( !GameManager.getInstance().getPlayer().isTutorialComplete() ){
              // System.out.println("tutorial:::: incomplete");
               //System.out.println("currentMission::::"+currentMission);
              // System.out.println("Main.loc.getText(currentMission.getItemID())::::"+Main.loc.getText(currentMission.getItemID()));
            if(currentMission != null && Main.loc.getText(currentMission.getItemID()).equals(ItemName) )
                GameManager.getInstance().getMissionManager().setCurrentMissionComplete();
        }
    }
    
    
    public void updateHintText(String status){
        
       HintsTextField.setText( status );

 
        new Thread()
        {
            public void run()
            {
                try {
                    Thread.sleep(2000);
                    HintsTextField.setText("");
                } catch (InterruptedException ex) {
                     ex.printStackTrace();
                }
            }
        }.start();
    }
    
    public void updateHud(String nome, int ouro, int energia,  int fruta, int madeira ){
        
        
        if(nome.equals(""))
            nome = Main.loc.getText("str_player_name");
        
            
        HelloLabel.setText(Main.loc.getText("str_hello")+" "+ nome);

        EnergiaLabel.setText(Main.loc.getText("str_energy")+" "+energia);

        OuroLabel.setText(Main.loc.getText("str_gold")+" "+ouro);

        FrutaLabel.setText(Main.loc.getText("str_fruit")+" "+fruta);

        MadeiraLabel.setText(Main.loc.getText("str_wood")+" "+madeira);

        //
        String[]  opToBuild=  new  String[GameManager.building.size()];
        for( int i =0 ; i< GameManager.building.size(); i++) 
         {
            // System.out.println("str_id::"+GameManager.building.get(i));
            // System.out.println("str::"+Main.loc.getText( GameManager.building.get(i)));
             opToBuild[i] = new String(  Main.loc.getText( GameManager.building.get(i))  );

         }                
        buildComboBox.setModel(new javax.swing.DefaultComboBoxModel( opToBuild ));
                
    }
    
    
    
    
    private void ButtonsActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add your handling code here:
        //System.out.println("teste"+evt.getID()+" param :"+evt.paramString());
       
        javax.swing.JButton button =  (javax.swing.JButton) evt.getSource();
       // System.out.println((String)  buildComboBox.getSelectedItem());
        
        String strItemSelecionado =  (String) buildComboBox.getSelectedItem();
        String statusItens = "";
        
        //verifica se o terreno está vazio
        if(buildComboBox.getSelectedIndex() != 0 && !button.getText().equals("") ){
            this.updateHintText(Main.loc.getText("str_terrain_empty"));
            buildComboBox.setSelectedIndex(0);
            return;
        }
            
        
        
        if(buildComboBox.getSelectedIndex() != 0 && button.getText().equals("") )//building itens
        {
            statusItens = GameManager.getInstance().buildingRules( strItemSelecionado );

            checkMissionComplete( strItemSelecionado );// tutorial 
            
            update();
            button.setText( strItemSelecionado  );
            buildComboBox.setSelectedIndex(0);
            updateHintText(statusItens);
        } else if( GameManager.getInstance().isPickedItem( button.getText() )) //pincking itens
        {
            
            statusItens = GameManager.getInstance().pickingRules( button.getText() );
            
            checkMissionComplete( button.getText() );// tutorial
           
            update();
            button.setText("");
            updateHintText(statusItens);
        }
        
        GameManager.getInstance().savePlayer();
  
    }   
    
   private int countbuttonDisabled; // libera dragao depois de seis botoes desabilitados
   public void leftMapActionPerformed (java.awt.event.ActionEvent evt){
   
         javax.swing.JButton button =  (javax.swing.JButton) evt.getSource();
         //button.setIcon(null);
         
         
         if( !GameManager.getInstance().getPlayer().isTutorialComplete() ){
             //System.out.println("Vc de terminar o tutorial"); // mostrar mensagem no status
             updateHintText( Main.loc.getText( "str_need_complete_tutorial" ));
             return;
         }
         
         if( button.getIcon() != null ){
             button.setIcon( null );
             countbuttonDisabled++;
             
             Random random = new Random(); 
             int numRd = random.nextInt(GameManager.picking.size());
             String strItem ;
             
             
             //verifica se pode mostrar o dragao  
             if( !GameManager.getInstance().getPlayer().isDragonDiscovered()  && countbuttonDisabled > 6 ){
                strItem = Main.loc.getText("str_dragon");
                GameManager.getInstance().getPlayer().setDragonDiscovered(1);
               // System.out.println("encontrou o dragao: " ); 
             }else{   
                strItem = (!"".equals( GameManager.picking.get( numRd ) ) ) ? Main.loc.getText( GameManager.picking.get( numRd ) ) :  "" ;

             }
             button.setText( strItem );
             return;
            
        }else
            ButtonsActionPerformed(evt);   
     
   }
    
    public static javax.swing.JButton TerrenoExplorerPanel[][];
    public void setLeftMapToExplorer(){

        //javax.swing.JButton 
         TerrenoExplorerPanel = new javax.swing.JButton[2][4];

        for(int i = 0; i< TerrenoExplorerPanel.length; i++ )
            for(int j = 0; j< TerrenoExplorerPanel[0].length; j++ ){
                
                TerrenoExplorerPanel[i][j] = new javax.swing.JButton();
               
                TerrenoExplorerPanel[i][j].setText( ""/*+i+""+j*/ );
                TerrenoExplorerPanel[i][j].setIcon(new javax.swing.ImageIcon(getClass().getResource("/cloud.png")));
                //jButton1.setText("jButton1");
                TerrenoExplorerPanel[i][j].setMaximumSize(new java.awt.Dimension(100, 29));
                TerrenoExplorerPanel[i][j].setMinimumSize(new java.awt.Dimension(100, 29));
                TerrenoExplorerPanel[i][j].setPreferredSize(new java.awt.Dimension(100, 29));
                TerrenoExplorerPanel[i][j].setSize(new java.awt.Dimension(100, 29));
                TerrenoExplorerPanel[i][j].addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    
                    leftMapActionPerformed(evt);
                }
            });
            
            
        }
    
        org.jdesktop.layout.GroupLayout MapaPanelLayout = new org.jdesktop.layout.GroupLayout(MapaExplore1Panel);
        MapaExplore1Panel.setLayout(MapaPanelLayout);
       
        //HorizontalGroup
        org.jdesktop.layout.GroupLayout.SequentialGroup hGroup = MapaPanelLayout.createSequentialGroup();
        hGroup.add(
                MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)                   
                //jButton11    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][0], 100 , org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)
                //jButton12   
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][1], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                //jButton13    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][2], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)    
                //jButton14
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][3], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                );
        
        hGroup.add(
                MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                   
                //jButton11    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][0], 100, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 //jButton12   
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][1], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 //jButton13    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][2], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)    
                //jButton14 
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][3], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                );

        MapaPanelLayout.setHorizontalGroup( hGroup  );
        
        
        //VerticalGroup
        org.jdesktop.layout.GroupLayout.SequentialGroup vGroup = MapaPanelLayout.createSequentialGroup();
        vGroup.add(
                MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                  //jButton11    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][0], 50, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  // jButton21   
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                );
        
        vGroup.add(
                MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                //jButton12    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][1], 50, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                //jButton22   
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][1], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                );
        vGroup.add(
                MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                //jButton13    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][2], 50, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                 //jButton23   
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][2], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                );
        vGroup.add(
                MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                //jButton14    
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[0][3], 50, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                //jButton24  
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoExplorerPanel[1][3], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                );
        
        MapaPanelLayout.setVerticalGroup( vGroup  );

    }
    
    public void localizeMap( Hashtable<String, String> hastableLocalized){
        
         System.out.println(  hastableLocalized.get("str_gold")  );
         Set<String> keys = hastableLocalized.keySet();
        
        
        //traduz o mapa tutorial
        String strNomeItem;
        for(int i = 0; i<4; i++ )
            for(int j = 0; j<4; j++ ){
                strNomeItem = TerrenoPanel[i][j].getText();
                if(!strNomeItem.equals(""))
                    for(String key: keys)
                    {
                        System.out.println(key);

                        if(TerrenoPanel[i][j].getText().equals( hastableLocalized.get(key ))){
                            TerrenoPanel[i][j].setText(Main.loc.getText( key ));
                        }
                    }   
            }
        
        
         //traduz o mapa de exploraçao
        for(int i = 0; i< TerrenoExplorerPanel.length; i++ )
            for(int j = 0; j< TerrenoExplorerPanel[0].length; j++ ){
                strNomeItem = TerrenoExplorerPanel[i][j].getText();
                if(!strNomeItem.equals(""))
                    for(String key: keys)
                    {
                        System.out.println(key);

                        if(TerrenoExplorerPanel[i][j].getText().equals( hastableLocalized.get(key ))){
                            TerrenoExplorerPanel[i][j].setText(Main.loc.getText( key ));
                        }
                    }   
            }
    
    }
    
    public void resetMAPs(){
        
        MapaPanel.removeAll();
        MapaExplore1Panel.removeAll();
        setTutorialMap();
        setLeftMapToExplorer();
       
    }
 
    public static javax.swing.JButton TerrenoPanel[][];
    public void setTutorialMap(){
        Random random = new Random();
        TerrenoPanel = new javax.swing.JButton[4][4];

        for(int i = 0; i<4; i++ )
            for(int j = 0; j<4; j++ ){
                if(TerrenoPanel[i][j] == null)
                TerrenoPanel[i][j] = new javax.swing.JButton();
 
                
                
                int numRd = random.nextInt(GameManager.picking.size());
                
    
                String strItem = (!"".equals( GameManager.picking.get( numRd ) ) ) ? Main.loc.getText( GameManager.picking.get( numRd ) ) :  "" ;
              //  System.out.println("Size:"+ GameManager.picking.size() + "Num sorteado:"+numRd+" String:"+ strItem ); 
                TerrenoPanel[i][j].setText( strItem );
                TerrenoPanel[i][j].setMaximumSize(new java.awt.Dimension(100, 29));
                TerrenoPanel[i][j].setMinimumSize(new java.awt.Dimension(100, 29));
                TerrenoPanel[i][j].setPreferredSize(new java.awt.Dimension(100, 29));
                TerrenoPanel[i][j].setSize(new java.awt.Dimension(100, 29));
              
                TerrenoPanel[i][j].addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ButtonsActionPerformed(evt);
                }
            });
            
            
        }
        
        if( GameManager.getInstance().getPlayer().isDragonDiscovered() ){
                int numRd = random.nextInt(GameManager.picking.size());
                TerrenoPanel[numRd][numRd].setText( Main.loc.getText("str_dragon") );
        }

        org.jdesktop.layout.GroupLayout MapaPanelLayout = new org.jdesktop.layout.GroupLayout(MapaPanel);
        MapaPanel.setLayout(MapaPanelLayout);
        MapaPanelLayout.setHorizontalGroup(
            MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(MapaPanelLayout.createSequentialGroup()
                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                   
                        //jButton14 - TerrenoPanel[0][4]
                    .add(TerrenoPanel[0][3], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                //jButton11    
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[0][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                jButton12   
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[0][1], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                jButton13    
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[0][2], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
               
                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(MapaPanelLayout.createSequentialGroup()
                       //jButton21
                        .add(TerrenoPanel[1][0], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(0, 0, 0)
                        //jButton31
                        .add(TerrenoPanel[2][0]))
                    .add(MapaPanelLayout.createSequentialGroup()
                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                //jButton23
                                .add(org.jdesktop.layout.GroupLayout.LEADING, TerrenoPanel[1][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
                                //jButton22
                                .add(TerrenoPanel[1][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(MapaPanelLayout.createSequentialGroup()
                                //jButton24
                                .add(TerrenoPanel[1][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(0, 0, 0)))
                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            //jButton33
                            .add(TerrenoPanel[2][2], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            //jButton32
                            .add(TerrenoPanel[2][1], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            //jButton34
                            .add(TerrenoPanel[2][3], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .add(0, 0, Short.MAX_VALUE)
                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            //jButton41
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[3][0], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            //jButton42
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[3][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        //jButton43
                        .add(TerrenoPanel[3][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    //jbuton44
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[3][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(0, 0, 0))
        );
        MapaPanelLayout.setVerticalGroup(
            MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(MapaPanelLayout.createSequentialGroup()
                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    //jButton11
                    .add(TerrenoPanel[0][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    //jButton21
                    .add(TerrenoPanel[1][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                    //jButton31
                    .add(TerrenoPanel[2][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    //jButton41
                    .add(TerrenoPanel[3][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(MapaPanelLayout.createSequentialGroup()
//                        jButton12
                        .add(TerrenoPanel[0][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(0, 0, 0)
                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            //jButton13
                            .add(TerrenoPanel[0][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            //jButton23
                            .add(TerrenoPanel[1][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(MapaPanelLayout.createSequentialGroup()
                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            //jButton22
                            .add(TerrenoPanel[1][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            //jButton32
                            .add(TerrenoPanel[2][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            //jButton42
                            .add(TerrenoPanel[3][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(0, 0, 0)
                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            //jButton33
                            .add(TerrenoPanel[2][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            //jButton43
                            .add(TerrenoPanel[3][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    //jButton14
                    .add(TerrenoPanel[0][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    //jButton24
                    .add(TerrenoPanel[1][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    //jButton34
                    .add(TerrenoPanel[2][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(MapaPanelLayout.createSequentialGroup()
                        .add(0, 0, 0)
                       //jButton44 
                        .add(TerrenoPanel[3][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
        );
    
        
//         org.jdesktop.layout.GroupLayout MapaPanelLayout = new org.jdesktop.layout.GroupLayout(MapaPanel);
//        MapaPanel.setLayout(MapaPanelLayout);
//        MapaPanelLayout.setHorizontalGroup(
//            MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//            .add(MapaPanelLayout.createSequentialGroup()
//                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
//                   
//                        //jButton14 - TerrenoPanel[0][4]
//                    .add(TerrenoPanel[0][3], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                //jButton11    
//                        .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[0][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
////                jButton12   
//                        .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[0][1], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
////                jButton13    
//                        .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[0][2], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
//               
//                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//                    .add(MapaPanelLayout.createSequentialGroup()
//                       //jButton21
//                        .add(TerrenoPanel[1][0], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                        .add(0, 0, 0)
//                        //jButton31
//                        .add(TerrenoPanel[2][0]))
//                    .add(MapaPanelLayout.createSequentialGroup()
//                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//                            .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
//                                //jButton23
//                                .add(org.jdesktop.layout.GroupLayout.LEADING, TerrenoPanel[1][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
//                                //jButton22
//                                .add(TerrenoPanel[1][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
//                            .add(MapaPanelLayout.createSequentialGroup()
//                                //jButton24
//                                .add(TerrenoPanel[1][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                                .add(0, 0, 0)))
//                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
//                            //jButton33
//                            .add(TerrenoPanel[2][2], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                            //jButton32
//                            .add(TerrenoPanel[2][1], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                            //jButton34
//                            .add(TerrenoPanel[2][3], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
//                .add(0, 0, Short.MAX_VALUE)
//                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//                    .add(org.jdesktop.layout.GroupLayout.TRAILING, MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//                            //jButton41
//                            .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[3][0], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                            //jButton42
//                            .add(org.jdesktop.layout.GroupLayout.TRAILING, TerrenoPanel[3][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
//                        //jButton43
//                        .add(TerrenoPanel[3][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
//                    
//                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton44, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
//                .add(0, 0, 0))
//        );
//        MapaPanelLayout.setVerticalGroup(
//            MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//            .add(MapaPanelLayout.createSequentialGroup()
//                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
//                    //jButton11
//                    .add(TerrenoPanel[0][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                    //jButton21
//                    .add(TerrenoPanel[1][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
//                    //jButton31
//                    .add(TerrenoPanel[2][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                    //jButton41
//                    .add(TerrenoPanel[3][0], org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
//                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
//                    .add(MapaPanelLayout.createSequentialGroup()
////                        jButton12
//                        .add(TerrenoPanel[0][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                        .add(0, 0, 0)
//                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
//                            //jButton13
//                            .add(TerrenoPanel[0][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                            //jButton23
//                            .add(TerrenoPanel[1][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
//                    .add(MapaPanelLayout.createSequentialGroup()
//                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
//                            //jButton22
//                            .add(TerrenoPanel[1][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                            //jButton32
//                            .add(TerrenoPanel[2][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                            //jButton42
//                            .add(TerrenoPanel[3][1], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
//                        .add(0, 0, 0)
//                        .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
//                            //jButton33
//                            .add(TerrenoPanel[2][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                            //jButton43
//                            .add(TerrenoPanel[3][2], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
//                .add(MapaPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
//                    //jButton14
//                    .add(TerrenoPanel[0][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                    //jButton24
//                    .add(TerrenoPanel[1][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                    //jButton34
//                    .add(TerrenoPanel[2][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
//                    .add(MapaPanelLayout.createSequentialGroup()
//                        .add(0, 0, 0)
//                       //jButton44 
//                        .add(TerrenoPanel[3][3], org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
//        );
    
    }
   
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel EnergiaLabel;
    private javax.swing.JLabel FrutaLabel;
    private javax.swing.JLabel HelloLabel;
    private javax.swing.JTextField HintsTextField;
    private javax.swing.JLabel MadeiraLabel;
    private javax.swing.JPanel MapaExplore1Panel;
    private javax.swing.JPanel MapaPanel;
    private javax.swing.JScrollPane MissionsScrollPane;
    private javax.swing.JLabel OuroLabel;
    private javax.swing.JComboBox buildComboBox;
    private javax.swing.JTextArea missionTextArea;
    private javax.swing.JButton profileMenu;
    // End of variables declaration//GEN-END:variables
}
